﻿using System;
using System.Windows.Forms;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using HYView;

namespace YJKArch.AreaSet
{
	[Transaction(TransactionMode.Manual)]
	[Regeneration(RegenerationOption.Manual)]
	public class CmdCheckForMiniWall : IExternalCommand
	{
		public Result Execute(ExternalCommandData cmdData, ref string messages, ElementSet elements)
		{
			CmdViewType types = (CmdViewType)5;
			if (SwitchView.SetUsableView(types, cmdData) != Autodesk.Revit.UI.Result.Succeeded)
			{
				MessageBox.Show("请在平面视图中运行!", "盈建科提示");
				return Autodesk.Revit.UI.Result.Failed;
			}
			new CheckForMiniWall(cmdData).CheckCurLevel();
			return Autodesk.Revit.UI.Result.Succeeded;
		}
	}
}
